/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.front.entity;

import org.hibernate.validator.constraints.Length;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import javax.validation.constraints.NotNull;

import com.thinkgem.jeesite.common.persistence.DataEntity;

/**
 * 新闻资讯管理Entity
 * @author 朱俊吉祥
 * @version 2017-11-27
 */
public class News extends DataEntity<News> {
	
	private static final long serialVersionUID = 1L;
	private String title;		// 标题
	private Date newsDate;		// 新闻日期
	private String link;		// 文章链接
	private Integer weight;		// 权重
	private String keywords;		// 关键字
	private String description;		// 描述、摘要
	private String image;		// 缩图
	private String content;		// 内容
	private String hits;		// 点击数
	private String hot;		// 热门标记
	private Integer sort;		// 排序
	private Date beginNewsDate;		// 开始 新闻日期
	private Date endNewsDate;		// 结束 新闻日期
	
	public News() {
		super();
	}

	public News(String id){
		super(id);
	}

	@Length(min=1, max=255, message="标题长度必须介于 1 和 255 之间")
	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@NotNull(message="新闻日期不能为空")
	public Date getNewsDate() {
		return newsDate;
	}

	public void setNewsDate(Date newsDate) {
		this.newsDate = newsDate;
	}
	
	@Length(min=0, max=255, message="文章链接长度必须介于 0 和 255 之间")
	public String getLink() {
		return link;
	}

	public void setLink(String link) {
		this.link = link;
	}
	
	public Integer getWeight() {
		return weight;
	}

	public void setWeight(Integer weight) {
		this.weight = weight;
	}
	
	@Length(min=1, max=255, message="关键字长度必须介于 1 和 255 之间")
	public String getKeywords() {
		return keywords;
	}

	public void setKeywords(String keywords) {
		this.keywords = keywords;
	}
	
	@Length(min=1, max=255, message="描述、摘要长度必须介于 1 和 255 之间")
	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}
	
	@Length(min=1, max=255, message="缩图长度必须介于 1 和 255 之间")
	public String getImage() {
		return image;
	}

	public void setImage(String image) {
		this.image = image;
	}
	
	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}
	
	@Length(min=0, max=11, message="点击数长度必须介于 0 和 11 之间")
	public String getHits() {
		return hits;
	}

	public void setHits(String hits) {
		this.hits = hits;
	}
	
	@Length(min=0, max=1, message="热门标记长度必须介于 0 和 1 之间")
	public String getHot() {
		return hot;
	}

	public void setHot(String hot) {
		this.hot = hot;
	}
	
	public Integer getSort() {
		return sort;
	}

	public void setSort(Integer sort) {
		this.sort = sort;
	}
	
	public Date getBeginNewsDate() {
		return beginNewsDate;
	}

	public void setBeginNewsDate(Date beginNewsDate) {
		this.beginNewsDate = beginNewsDate;
	}
	
	public Date getEndNewsDate() {
		return endNewsDate;
	}

	public void setEndNewsDate(Date endNewsDate) {
		this.endNewsDate = endNewsDate;
	}
		
}